<?php
/* @var $this BannerController */
/* @var $model Banner */

$this->breadcrumbs=array(
	'Banners'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'广告列表', 'url'=>array('index')),
	array('label'=>'新建广告', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#banner-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>管理广告</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'banner-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'pager'=>array(
        'class'=>'CLinkPager',
        'header'=>'转往分页：',
        'firstPageLabel'=>'首页',
        'lastPageLabel'=>'尾页', 
        'nextPageLabel'=>'下一页',
        'prevPageLabel'=>'前一页',
    ),
	'columns'=>array(
		'banner_id',
		'banner_imgpath',
		'banner_url',
		'banner_remark',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
